//
//  main.m
//  OC的多文件开发
//
//  Created by 许文娟 on 2024/3/12.
//

#import <Foundation/Foundation.h>
#import "Soldier.h"
#import "Shop.h"

int main(int argc, const char * argv[]) {
    //1、创建士兵
    Soldier *sp =[Soldier new];
    sp->_name=@"士兵";
    sp->_height=1.88;
    sp->_weight=100.0;
    
    //2、购买手枪
    Gun *gp = [Shop buyGun:888];
    //3、购买弹夹
    Clip *clip = [Shop buyClip:100];
    //让士兵开枪
    [sp fire:gp clip:clip];
    
    return 0;
}
